/*
 * Copyright (C) 2010 Seapeak.Xu
 *
 * fostmq may be copied only under the terms of the GNU General
 * Public License V3, which may be found in the fostmq source kit.
 *
 * Created on: 2010-8-3
 * Author: Seapeak.Xu
 */

#ifndef FOST_SOCK_H
#define FOST_SOCK_H
#ifdef __cplusplus
extern "C"
{
#endif

#include <stddef.h>
#include <sys/types.h>
#include "fost_event.h"
#include "fost_typedef.h"

int client_sock_init(const char *ip, const int port, const size_t timeout,bool isnonblocking);
int server_sock_init(const char *ip, const int port, const size_t listens,const size_t timeout);
int sock_accept(int sock,int threadpools);//, header_handler_proxy header_proxy,body_handler_proxy body_proxy);
int set_nonblocking(int sock);

#ifdef __cplusplus
}
#endif
#endif /* SOCKLIB_H_ */
